package createpattern.factory.simplefactory;

public class SimpleCoffeeFactory {

    public Coffee createCoffee(String type) {
        Coffee coffee = null;

        if ("americano".equals(type)) {
            coffee = new AmericanoCoffee();
        } else if ("latte".equals(type)) {
            coffee = new LatteCoffee();
        }

        coffee.addMilk();
        coffee.addSugar();

        return coffee;
    }

}
